package gates;

import java.awt.Graphics;

import master.QuantumRegister;

public class QuantumAdder implements QuantumGate{
	
	int control1,control2,target;
	QuantumGate tGate, cNGate;
	
	
	public QuantumAdder(int control1, int control2, int target){
		this.control1 = control1;
		this.control2 = control2;
		this.target = target;
		
		tGate = new ToffoliGate(control1,control2,target);
		cNGate = new CNot(control1, control2);
		
		
	}

	@Override
	public QuantumRegister actOnReg(QuantumRegister register) {
		register = tGate.actOnReg(register);
		register = cNGate.actOnReg(register);
		return register;
	}

	@Override
	public QuantumGate multiply(QuantumGate gate) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public boolean checkDim(QuantumRegister register)
			throws IllegalArgumentException {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void draw(Graphics g, int x, int y, float scale) {
		// TODO Auto-generated method stub
		
	}
	
	public static void main(String[] args){
		
	}

}
